package com.medicine.hbp.sp;

import android.content.Context;
import android.content.SharedPreferences;

public class UtilsSp {

	private static final String UTILS="utils";
	private static final String LOGIN_ONE_SP="login_one";

	private static final String LOGIN_ISLISK="login_islisk";

	private static final String LOGIN_ISYM="login_isym";


	private static SharedPreferences preferences;
	/**
	 * sc
	 */
	public static Boolean getIsOne(Context context) {
		preferences = context.getSharedPreferences(UTILS,Context.MODE_PRIVATE);
		return preferences.getBoolean(LOGIN_ONE_SP, false);
	}

	public static void setIsOne(boolean is_one,Context context) {
		preferences = context.getSharedPreferences(UTILS,Context.MODE_PRIVATE);
		preferences.edit().putBoolean(LOGIN_ONE_SP, is_one).commit();
	}


	/**
	 * like and  no  like
	 */
	public static Boolean getIsLisk(Context context) {
		preferences = context.getSharedPreferences(UTILS,Context.MODE_PRIVATE);
		return preferences.getBoolean(LOGIN_ISLISK, false);
	}

	public static void setIsLisk(boolean is_one,Context context) {
		preferences = context.getSharedPreferences(UTILS,Context.MODE_PRIVATE);
		preferences.edit().putBoolean(LOGIN_ISLISK, is_one).commit();
	}



	/**
	 *true  打开     false  关闭     有米广告
	 */
	public static Boolean getIsYm(Context context) {
		preferences = context.getSharedPreferences(UTILS,Context.MODE_PRIVATE);
		return preferences.getBoolean(LOGIN_ISYM, false);
	}

	public static void setIsYm(boolean is_ym,Context context) {
		preferences = context.getSharedPreferences(UTILS,Context.MODE_PRIVATE);
		preferences.edit().putBoolean(LOGIN_ISYM, is_ym).commit();
	}
}
